const { mongoose } = require("./db");
const Schema = mongoose.Schema;


const goodSchema = new Schema({

  name: {
    type: String,
    default: "",
  }, //商品名称
  num: {
    type: Number,
    default: 1,
  }, //商品数量
  desc: {
    type: String,
    default: "",
  },  //备注
  price:{
    type: Number,
    default:""
  },
  status:{
    type: Boolean,
    default: "待接单",
  },//商品状、态
  thumb: {
    type: String,
    default: "",
  }, //商品图片
});

const goodModel = mongoose.model("goods", goodSchema);


// goodModel.create({
//     name:'银色星芒刺绣网纱底裤',
//     desc:'肤色/M',
//     thumb:'"https://fastly.jsdelivr.net/npm/@vant/assets/ipad.jpeg"',
// })
module.exports = { goodModel };
